#include "drv_sysclk.h"
#include "drv_systick.h"
#include "drv_led.h"
#include "drv_key.h"
#include "drv_uart.h"
#include "drv_tim_basic.h"

#include "mm32f327xx_hal_config.h"

int main(void)
{
    SystemClockConfig();
    Drv_SysTick_Config();
    Drv_LED_Init();
    Drv_Key_Init();
    Drv_UART_Init();
    Drv_TIM_Basic_Init();
    
    while(1)
    {
        /* TDO Your Task */
        if(USER_KEY == pressed)
        {
            HAL_TIM_Basic_StartOnce(&htim, 50);
        }
    }
}

void HAL_TIM_Basic_PeriodElapsedCallback(HAL_TIM_Basic_InitType *tim)
{
    static LED_Status status = off;
    BOARD_LED(status);
    status = !status;
}


